// @ts-ignore
/* eslint-disable */
import { requestAuth } from '@/utils/request';

// 异常类别字典表
export async function fetchResponseCodeCategory() {
  return requestAuth({
    method: 'POST',
    url: `/api/sysExcCodeInfo/excCategoryList`,
  });
}

// 获取异常返回配置列表
export async function fetchResponseCodeData(data: {
  size?: number;
  current?: number;
  params?: {
    column: string;
    type: string;
    values?: string;
  }[];
}) {
  return requestAuth({
    method: 'POST',
    url: `/api/sysExcCodeInfo/excCodeInfoList`,
    data,
  });
}

// 修改码值信息
export async function modifyResponseCodeMessage(data: { id: string; returnMsg: string }) {
  return requestAuth({
    method: 'POST',
    url: `/api/sysExcCodeInfo/update`,
    data,
  });
}
